#pragma once
#include"Utility.h"

typedef int Stack_entry;

const int maxstack = 10;   //  small value for testing

class Double_stack {

public:
	Double_stack();
	bool empty_a() const;
	bool empty_b() const;
	bool full() const;   // Same method checks both stacks for fullness.
	Error_code pop_a();
	Error_code pop_b();
	Error_code stacktop_a(Stack_entry& item)const;
	Error_code stacktop_b(Stack_entry& item) const;
	Error_code push_a(const Stack_entry& item);
	Error_code push_b(const Stack_entry& item);
private:
	int top_a;     // index of top of stack a; -1 if empty
	int top_b;     // index of top of stack b; maxstack if empty
	Stack_entry entry[maxstack];
};